<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MDF Lib: mdf::MdfReader Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="utillib.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">MDF Lib<span id="projectnumber">&#160;2.2</span>
   </div>
   <div id="projectbrief">Interface against MDF 3/4 files</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacemdf.html">mdf</a></li><li class="navelem"><a class="el" href="classmdf_1_1_mdf_reader.html">MdfReader</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classmdf_1_1_mdf_reader-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">mdf::MdfReader Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Reader interface to an MDF file.  
 <a href="#details">More...</a></p>

<p><code>#include &quot;<a class="el" href="mdfreader_8h_source.html">mdf/mdfreader.h</a>&quot;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa7f0b2856814655ad23f99dd76bc7d44" id="r_aa7f0b2856814655ad23f99dd76bc7d44"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa7f0b2856814655ad23f99dd76bc7d44">MdfReader</a> (const std::string &amp;filename)</td></tr>
<tr class="separator:aa7f0b2856814655ad23f99dd76bc7d44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d21b5d7336b34547a049e07fd1408cc" id="r_a8d21b5d7336b34547a049e07fd1408cc"><td class="memItemLeft" align="right" valign="top"><a id="a8d21b5d7336b34547a049e07fd1408cc" name="a8d21b5d7336b34547a049e07fd1408cc"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><b>~MdfReader</b> ()</td></tr>
<tr class="memdesc:a8d21b5d7336b34547a049e07fd1408cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor that close any open file and destructs. <br /></td></tr>
<tr class="separator:a8d21b5d7336b34547a049e07fd1408cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e268b916c935073699b2b1145421b03" id="r_a4e268b916c935073699b2b1145421b03"><td class="memItemLeft" align="right" valign="top"><a id="a4e268b916c935073699b2b1145421b03" name="a4e268b916c935073699b2b1145421b03"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>MdfReader</b> (const <a class="el" href="classmdf_1_1_mdf_reader.html">MdfReader</a> &amp;)=delete</td></tr>
<tr class="separator:a4e268b916c935073699b2b1145421b03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8eb8408bd814136a4f6f4cbbf3ff152e" id="r_a8eb8408bd814136a4f6f4cbbf3ff152e"><td class="memItemLeft" align="right" valign="top"><a id="a8eb8408bd814136a4f6f4cbbf3ff152e" name="a8eb8408bd814136a4f6f4cbbf3ff152e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>MdfReader</b> (<a class="el" href="classmdf_1_1_mdf_reader.html">MdfReader</a> &amp;&amp;)=delete</td></tr>
<tr class="separator:a8eb8408bd814136a4f6f4cbbf3ff152e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1115552769eecb639c4f7d42bac6a557" id="r_a1115552769eecb639c4f7d42bac6a557"><td class="memItemLeft" align="right" valign="top"><a id="a1115552769eecb639c4f7d42bac6a557" name="a1115552769eecb639c4f7d42bac6a557"></a>
<a class="el" href="classmdf_1_1_mdf_reader.html">MdfReader</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classmdf_1_1_mdf_reader.html">MdfReader</a> &amp;)=delete</td></tr>
<tr class="separator:a1115552769eecb639c4f7d42bac6a557"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a3b56c27e252b7d59bab94b4149881c" id="r_a9a3b56c27e252b7d59bab94b4149881c"><td class="memItemLeft" align="right" valign="top"><a id="a9a3b56c27e252b7d59bab94b4149881c" name="a9a3b56c27e252b7d59bab94b4149881c"></a>
<a class="el" href="classmdf_1_1_mdf_reader.html">MdfReader</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classmdf_1_1_mdf_reader.html">MdfReader</a> &amp;&amp;)=delete</td></tr>
<tr class="separator:a9a3b56c27e252b7d59bab94b4149881c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0675cacfb831f8700c9c323feb42ef8" id="r_af0675cacfb831f8700c9c323feb42ef8"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af0675cacfb831f8700c9c323feb42ef8">Index</a> () const</td></tr>
<tr class="separator:af0675cacfb831f8700c9c323feb42ef8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53daae43b08717a2178f73270188d019" id="r_a53daae43b08717a2178f73270188d019"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a53daae43b08717a2178f73270188d019">Index</a> (int64_t index)</td></tr>
<tr class="separator:a53daae43b08717a2178f73270188d019"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ba4d7ff6bc5500427f093771c1762e6" id="r_a0ba4d7ff6bc5500427f093771c1762e6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0ba4d7ff6bc5500427f093771c1762e6">IsOk</a> () const</td></tr>
<tr class="separator:a0ba4d7ff6bc5500427f093771c1762e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af98f1f425b626097e2728185f3c2eb8a" id="r_af98f1f425b626097e2728185f3c2eb8a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af98f1f425b626097e2728185f3c2eb8a">IsFinalized</a> () const</td></tr>
<tr class="memdesc:af98f1f425b626097e2728185f3c2eb8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the file is marked as finalized.  <br /></td></tr>
<tr class="separator:af98f1f425b626097e2728185f3c2eb8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a590c1e3a97b2a69f6e2cb203badd2282" id="r_a590c1e3a97b2a69f6e2cb203badd2282"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classmdf_1_1_mdf_file.html">MdfFile</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a590c1e3a97b2a69f6e2cb203badd2282">GetFile</a> () const</td></tr>
<tr class="separator:a590c1e3a97b2a69f6e2cb203badd2282"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9abc5d58be4d23b0b1c476d8a3a3a4d3" id="r_a9abc5d58be4d23b0b1c476d8a3a3a4d3"><td class="memItemLeft" align="right" valign="top"><a id="a9abc5d58be4d23b0b1c476d8a3a3a4d3" name="a9abc5d58be4d23b0b1c476d8a3a3a4d3"></a>
const <a class="el" href="classmdf_1_1_i_header.html">IHeader</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>GetHeader</b> () const</td></tr>
<tr class="memdesc:a9abc5d58be4d23b0b1c476d8a3a3a4d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the header (HD) block. <br /></td></tr>
<tr class="separator:a9abc5d58be4d23b0b1c476d8a3a3a4d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f05147406ef2de50559a35c4c399abb" id="r_a8f05147406ef2de50559a35c4c399abb"><td class="memItemLeft" align="right" valign="top"><a id="a8f05147406ef2de50559a35c4c399abb" name="a8f05147406ef2de50559a35c4c399abb"></a>
<a class="el" href="classmdf_1_1_i_data_group.html">IDataGroup</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>GetDataGroup</b> (size_t order) const</td></tr>
<tr class="memdesc:a8f05147406ef2de50559a35c4c399abb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the data group (DG) block. <br /></td></tr>
<tr class="separator:a8f05147406ef2de50559a35c4c399abb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e6380bb34582a34eec11b693648d6d5" id="r_a8e6380bb34582a34eec11b693648d6d5"><td class="memItemLeft" align="right" valign="top"><a id="a8e6380bb34582a34eec11b693648d6d5" name="a8e6380bb34582a34eec11b693648d6d5"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>ShortName</b> () const</td></tr>
<tr class="memdesc:a8e6380bb34582a34eec11b693648d6d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the file name without paths. <br /></td></tr>
<tr class="separator:a8e6380bb34582a34eec11b693648d6d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95758453003b0132b6324101096611b1" id="r_a95758453003b0132b6324101096611b1"><td class="memItemLeft" align="right" valign="top"><a id="a95758453003b0132b6324101096611b1" name="a95758453003b0132b6324101096611b1"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>Open</b> ()</td></tr>
<tr class="memdesc:a95758453003b0132b6324101096611b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens the file stream for reading. <br /></td></tr>
<tr class="separator:a95758453003b0132b6324101096611b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcd1fda3384e9d538803e0504c4cc7a4" id="r_abcd1fda3384e9d538803e0504c4cc7a4"><td class="memItemLeft" align="right" valign="top"><a id="abcd1fda3384e9d538803e0504c4cc7a4" name="abcd1fda3384e9d538803e0504c4cc7a4"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Close</b> ()</td></tr>
<tr class="memdesc:abcd1fda3384e9d538803e0504c4cc7a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the file stream. <br /></td></tr>
<tr class="separator:abcd1fda3384e9d538803e0504c4cc7a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e1b3dca5f2b9d0c8b80ecdf843d86ba" id="r_a4e1b3dca5f2b9d0c8b80ecdf843d86ba"><td class="memItemLeft" align="right" valign="top"><a id="a4e1b3dca5f2b9d0c8b80ecdf843d86ba" name="a4e1b3dca5f2b9d0c8b80ecdf843d86ba"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>ReadHeader</b> ()</td></tr>
<tr class="memdesc:a4e1b3dca5f2b9d0c8b80ecdf843d86ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the ID and the HD block. <br /></td></tr>
<tr class="separator:a4e1b3dca5f2b9d0c8b80ecdf843d86ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4eb4a1808b4826a6befa2a608790e707" id="r_a4eb4a1808b4826a6befa2a608790e707"><td class="memItemLeft" align="right" valign="top"><a id="a4eb4a1808b4826a6befa2a608790e707" name="a4eb4a1808b4826a6befa2a608790e707"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>ReadMeasurementInfo</b> ()</td></tr>
<tr class="memdesc:a4eb4a1808b4826a6befa2a608790e707"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads everything but not CG and raw data. <br /></td></tr>
<tr class="separator:a4eb4a1808b4826a6befa2a608790e707"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64bd57d67582f7cb2f911f4d427fb5ce" id="r_a64bd57d67582f7cb2f911f4d427fb5ce"><td class="memItemLeft" align="right" valign="top"><a id="a64bd57d67582f7cb2f911f4d427fb5ce" name="a64bd57d67582f7cb2f911f4d427fb5ce"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>ReadEverythingButData</b> ()</td></tr>
<tr class="memdesc:a64bd57d67582f7cb2f911f4d427fb5ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads all blocks but not raw data. <br /></td></tr>
<tr class="separator:a64bd57d67582f7cb2f911f4d427fb5ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8209013830f087b0f08a281259361108" id="r_a8209013830f087b0f08a281259361108"><td class="memItemLeft" align="right" valign="top"><a id="a8209013830f087b0f08a281259361108" name="a8209013830f087b0f08a281259361108"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>ExportAttachmentData</b> (const <a class="el" href="classmdf_1_1_i_attachment.html">IAttachment</a> &amp;attachment, const std::string &amp;dest_file)</td></tr>
<tr class="memdesc:a8209013830f087b0f08a281259361108"><td class="mdescLeft">&#160;</td><td class="mdescRight">Export the attachment data to a detination file. <br /></td></tr>
<tr class="separator:a8209013830f087b0f08a281259361108"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a7b46a48cac62ed16897f28f3649ba9" id="r_a3a7b46a48cac62ed16897f28f3649ba9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3a7b46a48cac62ed16897f28f3649ba9">ReadData</a> (<a class="el" href="classmdf_1_1_i_data_group.html">IDataGroup</a> &amp;data_group)</td></tr>
<tr class="memdesc:a3a7b46a48cac62ed16897f28f3649ba9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads all sample, sample reduction and signal data into memory.  <br /></td></tr>
<tr class="separator:a3a7b46a48cac62ed16897f28f3649ba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e19cc38b9ea526c3020398738a3db64" id="r_a0e19cc38b9ea526c3020398738a3db64"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0e19cc38b9ea526c3020398738a3db64">ReadPartialData</a> (<a class="el" href="classmdf_1_1_i_data_group.html">IDataGroup</a> &amp;data_group, size_t min_sample, size_t max_sample)</td></tr>
<tr class="memdesc:a0e19cc38b9ea526c3020398738a3db64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a range of samples.  <br /></td></tr>
<tr class="separator:a0e19cc38b9ea526c3020398738a3db64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f1c16a9230973d05788b49b81ca32fd" id="r_a2f1c16a9230973d05788b49b81ca32fd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2f1c16a9230973d05788b49b81ca32fd">ReadSrData</a> (<a class="el" href="classmdf_1_1_i_sample_reduction.html">ISampleReduction</a> &amp;sr_group)</td></tr>
<tr class="memdesc:a2f1c16a9230973d05788b49b81ca32fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads in data bytes to a sample reduction (SR) block.  <br /></td></tr>
<tr class="separator:a2f1c16a9230973d05788b49b81ca32fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21b97f7036c49f6beb2f7f5772c6fde9" id="r_a21b97f7036c49f6beb2f7f5772c6fde9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a21b97f7036c49f6beb2f7f5772c6fde9">ReadVlsdData</a> (<a class="el" href="classmdf_1_1_i_data_group.html">IDataGroup</a> &amp;data_group, <a class="el" href="classmdf_1_1_i_channel.html">IChannel</a> &amp;vlsd_channel, const std::vector&lt; uint64_t &gt; &amp;offset_list, std::function&lt; void(uint64_t, const std::vector&lt; uint8_t &gt; &amp;)&gt; &amp;callback)</td></tr>
<tr class="memdesc:a21b97f7036c49f6beb2f7f5772c6fde9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read in partial variable length data with an offset list.  <br /></td></tr>
<tr class="separator:a21b97f7036c49f6beb2f7f5772c6fde9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This is the main interface when reading MDF3 and MDF4 files. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aa7f0b2856814655ad23f99dd76bc7d44" name="aa7f0b2856814655ad23f99dd76bc7d44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7f0b2856814655ad23f99dd76bc7d44">&#9670;&#160;</a></span>MdfReader()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mdf::MdfReader::MdfReader </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>filename</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor that opens the file and read ID and HD block. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a590c1e3a97b2a69f6e2cb203badd2282" name="a590c1e3a97b2a69f6e2cb203badd2282"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a590c1e3a97b2a69f6e2cb203badd2282">&#9670;&#160;</a></span>GetFile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classmdf_1_1_mdf_file.html">MdfFile</a> * mdf::MdfReader::GetFile </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">nodiscard</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns a pointer to the MDF file. This file holds references to the MDF blocks. </p><dl class="section return"><dt>Returns</dt><dd>Pointer to the MDF file object. Note it may return a null pointer. </dd></dl>

</div>
</div>
<a id="af0675cacfb831f8700c9c323feb42ef8" name="af0675cacfb831f8700c9c323feb42ef8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0675cacfb831f8700c9c323feb42ef8">&#9670;&#160;</a></span>Index() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int64_t mdf::MdfReader::Index </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">nodiscard</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Unique index for this reader. This index is typically used when fetching files from a database. The index itself is not used by the reader. </p><dl class="section return"><dt>Returns</dt><dd>An unique index. </dd></dl>

</div>
</div>
<a id="a53daae43b08717a2178f73270188d019" name="a53daae43b08717a2178f73270188d019"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53daae43b08717a2178f73270188d019">&#9670;&#160;</a></span>Index() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void mdf::MdfReader::Index </td>
          <td>(</td>
          <td class="paramtype">int64_t</td>          <td class="paramname"><span class="paramname"><em>index</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a unique index to this reader or actually its file. This index is typically retrieved from a database and makes finding files much easier than comparing paths. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>Unique index. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af98f1f425b626097e2728185f3c2eb8a" name="af98f1f425b626097e2728185f3c2eb8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af98f1f425b626097e2728185f3c2eb8a">&#9670;&#160;</a></span>IsFinalized()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool mdf::MdfReader::IsFinalized </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">nodiscard</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This function returns true if the file is marked as finalized. This is done by checking the ID block. </p><dl class="section return"><dt>Returns</dt><dd>True if the file is marked as finalized. </dd></dl>

</div>
</div>
<a id="a0ba4d7ff6bc5500427f093771c1762e6" name="a0ba4d7ff6bc5500427f093771c1762e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ba4d7ff6bc5500427f093771c1762e6">&#9670;&#160;</a></span>IsOk()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool mdf::MdfReader::IsOk </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">nodiscard</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Checks if the file was read without errors. </p><dl class="section return"><dt>Returns</dt><dd>True if the file was read OK. </dd></dl>

</div>
</div>
<a id="a3a7b46a48cac62ed16897f28f3649ba9" name="a3a7b46a48cac62ed16897f28f3649ba9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a7b46a48cac62ed16897f28f3649ba9">&#9670;&#160;</a></span>ReadData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mdf::MdfReader::ReadData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmdf_1_1_i_data_group.html">IDataGroup</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>data_group</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reads in all data bytes that belongs to a data group (DG). The function reads in sample data (DT..) blocks, sample reduction (RD/RV/RI) blocks and signal data (SD) blocks. Note that this function may consume a lot of memory, so remember to call the <a class="el" href="classmdf_1_1_i_data_group.html#a587a87009a2cc5bbdb067f4c7fbe4d1b" title="Clear all temporary sample and data buffers.">IDataGroup::ClearData()</a> function when data not are needed anymore.</p>
<p>The attached observers also consumes memory, so remember to delete them when they are no more needed. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data_group</td><td>Reference to the data group (DG) object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the read was successful. </dd></dl>

</div>
</div>
<a id="a0e19cc38b9ea526c3020398738a3db64" name="a0e19cc38b9ea526c3020398738a3db64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e19cc38b9ea526c3020398738a3db64">&#9670;&#160;</a></span>ReadPartialData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mdf::MdfReader::ReadPartialData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmdf_1_1_i_data_group.html">IDataGroup</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>data_group</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>min_sample</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>max_sample</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reads in a range of samples a data group (DG). The function reads in sample data (DT..) blocks, sample reduction (RD/RV/RI) blocks and signal data (SD) blocks. The function is faster that reading all data bytes, skipping records it doesn't need to read.</p>
<p>Note that this function still may consume a lot of memory, so remember to call the <a class="el" href="classmdf_1_1_i_data_group.html#a587a87009a2cc5bbdb067f4c7fbe4d1b" title="Clear all temporary sample and data buffers.">IDataGroup::ClearData()</a> function when data not are needed anymore.</p>
<p>The attached observers also consumes memory, so remember to delete them when they are no more needed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data_group</td><td>Reference to the data group (DG) object. </td></tr>
    <tr><td class="paramname">min_sample</td><td>First sample index to read. </td></tr>
    <tr><td class="paramname">max_sample</td><td>Last sample index to read. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the read was successful. </dd></dl>

</div>
</div>
<a id="a2f1c16a9230973d05788b49b81ca32fd" name="a2f1c16a9230973d05788b49b81ca32fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f1c16a9230973d05788b49b81ca32fd">&#9670;&#160;</a></span>ReadSrData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mdf::MdfReader::ReadSrData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmdf_1_1_i_sample_reduction.html">ISampleReduction</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>sr_group</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>To minimíze the use of time and memory, this function reads in data for one sample reduction (SR) block. The function is much faster than to read in all data bytes for a data group (DG). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sr_group</td><td>Reference to a sample reduction (SR) block. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the read was successful. </dd></dl>

</div>
</div>
<a id="a21b97f7036c49f6beb2f7f5772c6fde9" name="a21b97f7036c49f6beb2f7f5772c6fde9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21b97f7036c49f6beb2f7f5772c6fde9">&#9670;&#160;</a></span>ReadVlsdData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mdf::MdfReader::ReadVlsdData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmdf_1_1_i_data_group.html">IDataGroup</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>data_group</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmdf_1_1_i_channel.html">IChannel</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>vlsd_channel</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; uint64_t &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>offset_list</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::function&lt; void(uint64_t, const std::vector&lt; uint8_t &gt; &amp;)&gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>callback</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function reads in VLSD stored data according to an offset list. For smaller MDF files that fits in the primary memory, this function is not needed but sometimes the VLSD data sample holds a large amount of data bytes typical a video stream. These files tends to be huge so the application runs out of memory.</p>
<p>This function reads in VLSD stored data in smaller batcher. The application first reads in all offsets to the raw data. Using these offsets the application can read in typically one sample (offset) at a time. This tactic saves primary memory.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data_group</td><td>Data group to read VLSD data from </td></tr>
    <tr><td class="paramname">vlsd_channel</td><td>Which channel that stores the VLSD data </td></tr>
    <tr><td class="paramname">offset_list</td><td>List of offsets (samples) to read. </td></tr>
    <tr><td class="paramname">callback</td><td>Callback function for each offset/sample data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns true if the read was successful </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/mdf/<a class="el" href="mdfreader_8h_source.html">mdfreader.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
